package com.olddriver.crm.web.controller;

import com.olddriver.crm.domain.ClientMove;
import com.olddriver.crm.page.PageResult;
import com.olddriver.crm.query.ClientMoveQueryObject;
import com.olddriver.crm.service.IClientMoveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("clientMove")
public class ClientMoveController {
    @Autowired
    private IClientMoveService clientMoveService;

    //跳转到潜在客户的页面
    @RequestMapping("view")
    public String fake_view() {
        return "client/client_move";
    }

    //查询客户移交记录
    @ResponseBody
    @RequestMapping("selectAllMove")
    public PageResult selectAllMove(ClientMoveQueryObject qo) {
        PageResult result = clientMoveService.query(qo);
        return result;
    }

    @RequestMapping("save")
    public void save(ClientMove clientMove) {
        clientMoveService.save(clientMove);
    }

}
